<form class="layui-form" action="{:url()}" method="post" id="editForm" lay-filter="edit-form">
    
    {:FormExt::input('项目名', 'name', '', '请输入项目名称', 'required', 'lay-verify="required"')}
    {:FormExt::input('备注', 'remark', '', '备注', '', 'lay-verify="" ')}
    {:FormExt::hidden('', 'admin_id', ADMIN_ID)}

    <div class="pop-bottom-bar">
    	<input type="hidden" class="field-id" name="id">
        <button type="submit" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="formSubmit" hisi-data="{pop: true, refresh: false, callback: callbackUpdateTask}">提交保存</button>
        <a href="javascript:parent.layui.layer.closeAll();" class="layui-btn layui-btn-primary ml10">取消</a>
    </div>
</form>

{include file="system@block/layui" /}
    
<script>
    var formData = {:json_encode($formData)};
    layui.use(['form', 'func'], function() {
        var $ = layui.jquery, form = layui.form;
        layui.func.assign(formData);
    });
layui.use(['tool', 'form', 'layer'], function() {
	// 表单提交回调
  var a={:json_encode($action=request()->action())};
  if(a='add'){
      window.callbackUpdateTask = function(obj, res) {
        if (res.code == 1) layer.msg(res.msg, {icon: 1,end:function(){
                parent.layui.layer.closeAll();
                parent.location.reload();
            }
        });
      }
  }
});
</script>